package daoyu.controller.security;
import pojo.result.ApiResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import pojo.result.ResponseCode;

@RestController
@Tag(name = "权限部分管理")
@RequestMapping("/security")
public class SecurityController {


    @Operation(summary = "权限列表")
    @GetMapping("/list")
    public ApiResponse list() {
    return ApiResponse.success("权限列表");
    }
    @GetMapping("/example")
    public ApiResponse<String> getExample() {
        String data = "Hello, World!";
        return ApiResponse.success(data);
    }


    @GetMapping("/error")
    public ApiResponse<String> getError() {
        return ApiResponse.paramError("sas");
    }

    @GetMapping("/custom")
    public ApiResponse<String> getCustom() {
        return ApiResponse.systemError("sau");
    }
}
